<!doctype html>
<html lang="en">
	<link rel="stylesheet" href="./Public/Home/css/index.css" />
	<link rel="stylesheet" href="./Public/Home/css/common.css" />
	<script type="text/javascript" src="./Public/Home/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="./Public/Home/js/land.js"></script>
	<script type="text/javascript">
		$(function(){
			$('.block li').hover(function(){
				$(this).find('.none').show();
			},function(){
				$(this).find('.none').hide();
			})
			
			$('.username').click(function(){
				if($(this).attr('username') == 0){
					$('.outlogin-box').fadeIn();
					$(this).attr('username','1');
				}else{
					$('.outlogin-box').fadeOut();
					$(this).attr('username','0');
				}
			})
		})
	</script>
<head>
	<meta charset="UTF-8" />
	<title>首页</title>
</head>
<body>
	<!--登录-->
<div class="land">	
	<a href="javascript:;" id="landbottom1" class="landTop landTop1">登录</a>
	<a href="javascript:;" id="landbottom2" class="landTop">注册</a>
	<a href="javascript:;" class="x">×</a>
	<div class="landbottom landbottom1">
		<form action="http://127.0.0.1/Xu shixing/Mall/index.php?m=Home&c=Login&a=login" method="post">
			<ul>
				<li>
					<span><img src="./Public/Home/images/username.jpg" alt="" /></span>
					<input type="text" name="username" id="" placeholder="请输入手机号" class="user"/>
				</li>
				<li>
					<span><img src="./Public/Home/images/password.jpg" alt="" /></span>
					<input type="password" name="password" id="" placeholder="请输入密码" class="user"/>
				</li>
				<li style="margin-top: 20px;">
					<input type="checkbox" name="" id="" checked="checked"/>
					<sp>自动登录</sp>
				</li>
				<li style="margin-top: 0;">
					<input type="submit" value="登录" class="button"/>
				</li>
			</ul>
		</form>
	</div>
	<div class="landbottom landbottom2">
		<form action="javascript:;" onsubmit="submits(this,'http://127.0.0.1/Xu shixing/Mall/index.php?m=Home&c=Login&a=register')" method="post">
			<ul>
				<li>
					<sp>账号：</sp>
					<input type="text" name="username" id="" class="shuru" placeholder="请输入手机号"/>
					<span id="msg"></span>
				</li>
				<li>
					<sp>密码：</sp>
					<input type="password" name="password" id="password" class="shuru" placeholder="请输入密码"/>
				</li>
				<li>
					<sp>确认密码：</sp>
					<input type="password" name="confirmPassword" id="confirmPassword" class="shuru" placeholder="请再次输入密码"/>
					<span class="msg"></span>
				</li>
				<li>
					<sp>验证码：</sp>
					<input type="text" name="" id="code" class="shuru" style="width: 110px;"/>
					<img src="http://127.0.0.1/Xu shixing/Mall/index.php?m=Home&c=Login&a=code" onclick="this.src = this.src + '&mt=' + Math.random()" alt=""/>
					<span class="code" style="margin-right: 200px;"></span>
				</li>
				<li>
					<input type="checkbox" name="" id="" checked="checked" style="margin-left: 120px;"/>
					<spa>同意联想的 <a href="" style="color: blue;">使用条款</a> 和 <a href="" style="color: blue;">隐私权政策</a></spa>
				</li>
				<li>
					<input type="submit" value="立即注册" class="button"/>
				</li>
			</ul>
		</form>
	</div>
</div>
<div class="zhezhao"></div>

<script type="text/javascript">
	function submits(obj,url){
		var preg = /(\+86)?1[2-9]\d{9}/;
		if(!obj['username'].value.match(preg)){
			alert('用户名不合法');
			return;
		}
		if(obj['confirmPassword'].value != obj['password'].value){
			alert('2次密码不一致');
			return;
		} 
		var data = $(obj).serialize();
		var username = obj['username'].value;
		var password = obj['password'].value;
		var confirmPassword = obj['confirmPassword'].value;
		var code = obj['code'].value;
		$.ajax({
			type:"post",
			url:url,
			data:{username:username,password:password,confirmPassword:confirmPassword,code:code},
			success:function(data){
				var data = $.parseJSON(data);
				if(data.error == 1){
					alert(data.msg);
				}else{
					obj['username'].value = '';
					obj['password'].value = '';
					obj['confirmPassword'].value = '';
					obj['code'].value = '';
					alert(data.msg);
					$('.land').hide();
					$('.zhezhao').hide();
				}
			}
		});
	}
	$(function(){
		$('input[name=username]').blur(function(){
			var preg = /(\+86)?1[2-9]\d{9}/;
			var pregs = $(this).val().match(preg);
			var username = this;
			var uname = $(this).val();
			$.ajax({
				type:"post",
				url:"http://127.0.0.1/Xu shixing/Mall/index.php?m=Home&c=Login&a=username",
				data:{uname:uname,pregs:pregs},
				dataType:"json",
				success:function(data){
					if(data == 1){
						username.error = 1;
						$('#msg').html('<span style="color:red;">用户名已存在</span>');
					}else{
						username.error = 0;
						$('#msg').html('<span style="color:green;">可以注册</span>');
					}
					if(data == 2){
						username.error = 1;
						$('#msg').html('<span style="color:red;">请输入用户名</span>');
					}
					if(data == 3){
						username.error = 1;
						$('#msg').html('<span style="color:red;">用户名不合法</span>');
					}
				}
			})
		})
			
		$('input[name=confirmPassword]').blur(function(){
			var upassword = this;
			var password = $('#password').val();
			var confirmPassword = $('#confirmPassword').val();
			$.ajax({
				type:"post",
				url:"http://127.0.0.1/Xu shixing/Mall/index.php?m=Home&c=Login&a=password",
				data:{password:password,confirmPassword:confirmPassword},
				dataType:"json",
				success:function(data){
					if(data == 1){
						confirmPassword.error = 1;
						$('.msg').html('<span style="color:red;">2次密码不一致</span>');
					}else{
						confirmPassword.error = 0;
						$('.msg').html('<span style="color:green;">可以注册</span>');
					}
					if(data == 2){
						confirmPassword.error = 1;
						$('.msg').html('<span style="color:red;">请输入密码</span>');
					}
				}
			})
		})
		
		$('#code').blur(function(){
			var codes = this;
			var code = $(this).val();
			$.ajax({
				type:"post",
				url:"http://127.0.0.1/Xu shixing/Mall/index.php?m=Home&c=Login&a=codes",
				data:{code:code},
				dataType:"json",
				success:function(data){
					if(data == 1){
						codes.error = 1;
						$('.code').html('<span style="color:red;">请输入验证码</span>');
					}else{
						$('.code').html('<span style="color:green;">验证通过</span>');
					}
					if(data == 2){
						$('.code').html('<span style="color:red;">验证码错误</span>');
					}
				}
			})
		})
	})
</script>
	<!--头部-->
	<div class="top-box">
		<div class="top">
			<div class="top-left">
				<ul class="left-ul">
					<li><a href="" class="a">个人及家用</a></li>
					<li><a href="" class="a">个人及家用</a></li>
					<li><a href="" class="a">个人及家用</a></li>
					<li><a href="" class="a">个人及家用</a></li>
					<li><a href="" class="a">个人及家用</a></li>
					<li><a href="" class="c">个人及家用</a></li>
				</ul>
			</div>
			<div class="top-right">
				<ul class="right-ul">
					<li><a href="<?php echo U('Shopping/index')?>">购物车</a></li>
					<?php if(isset($_SESSION['username'])){?>
                
					<li><a href="javascript:;" class="order">我的订单</a> | </li>
					<li>
						<a href="javascript:;" class="username" username="0"><?php echo $_SESSION['username']?></a> | 
						<div class="outlogin-box"><a href="<?php echo U('Login/out')?>">退出登录</a></div>
					</li>
					<?php }else{?>
					<li><a href="javascript:;" class="zhuc">注册</a> | </li>
					<li><a href="javascript:;" class="dengl">登录</a> | </li>
					
               <?php }?>
				</ul>
			</div>
		</div>
	</div>
	<!--索引-->
	<div class="logo">
		<div class="logo-left">
			<a href=""><div></div></a>
		</div>
		<div class="logo-right">
			<div>
				<div class="indexed"></div>
				<input type="text" name="" id="" placeholder="请输入"/>
			</div>
		</div>
		<div class="value">
			<ul>
				<li><a href="">乐檬X3</a></li>
				<li><a href="">小新笔记本</a></li>
				<li><a href="">YOGA 4 Pro</a></li>
				<li><a href="">ThinkPad X1系列</a></li>
				<li><a href="">联想P1</a></li>
				<li><a href="">看家宝</a></li>
			</ul>
		</div>
	</div>
	<div class="cateT">
		<div class="cateLeft"></div>
		<div class="cateRight">
			<ul>
				<?php foreach ($categoryData as $v){?>
				<?php if($v['pid']==0){?>
                
				<li><a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>"><?php echo $v['cname']?></a></li>
				
               <?php }?>
				<?php }?>
			</ul>
		</div>
	</div>
	<!--菜单-->
	<div class="cate">
		<div class="cate-left">	
			<div class="block">
				<ul>
					<?php foreach ($categoryData as $v){?>
					<li>
						<a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>" class="li"><?php echo $v['cname']?><span>＞</span></a>
						<ul class="none">
							<?php foreach ($v['son'] as $val){?>
							<li class="two"><a href="<?php echo U('List/index',array('cid'=>$val['cid']))?>"><?php echo $val['cname']?></a></li>
								<?php foreach ($val['son'] as $value){?>
								<li class="three"><a href="<?php echo U('List/index',array('cid'=>$value['cid']))?>"><?php echo $value['cname']?></a></li>
								<?php }?>
							<?php }?>
						</ul>
					</li>
					<?php }?>
				</ul>
			</div>
		</div>
		<div class="cate-center">
			<img src="././Public/Home/images/1.jpg" alt="" />
		</div>
		<div class="cate-right">
			<span class="rightTop"><span></span><a href="">注册会员即送乐豆，评论、晒单乐豆十倍送，100乐豆=1元钱哦！</a></span>
			<span class="rightCenter"><span>精彩讨论</span><a href="">更多></a></span>
			<span class="rightBottom">
				<a href="">【活动】电脑管家2.0内测赢大奖</a>
				<a href="">【活动】电脑管家2.0内测赢大奖</a>
				<a href="">【活动】电脑管家2.0内测赢大奖</a>
				<a href="">【活动】电脑管家2.0内测赢大奖</a>
				<a href="">【活动】电脑管家2.0内测赢大奖</a>
				<a href="">【活动】电脑管家2.0内测赢大奖</a>
				<a href="">【活动】电脑管家2.0内测赢大奖</a>
			</span>
		</div>
	</div>
	<!--推荐-->
	<div class="tuijian">
		<div class="tj1">
			<img src="././Public/Home/images/tuijian.jpg" alt="" />
		</div>
		<div class="tj2">
			<img src="././Public/Home/images/1-1.jpg" alt="" />
			<img src="././Public/Home/images/1-2.jpg" alt="" />
			<img src="././Public/Home/images/1-3.jpg" alt="" />
			<img src="././Public/Home/images/1-4.jpg" alt="" />
		</div>
	</div>
	<!--明星单品-->
	<div class="ming">
		<div class="ming-top">
			<span class="title">明星单品</span>
			<a href=""><span class="right"></span></a>
			<a href=""><span class="left"></span></a>
		</div>
		<div class="ming-bottom">
			<ul>
				<li class="boderLeft">
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="img" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeGray size">预约抢购优惠200元</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="img" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeGray size">预约抢购优惠200元</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="img" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeGray size">预约抢购优惠200元</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="img" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeGray size">预约抢购优惠200元</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="img" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeGray size">预约抢购优惠200元</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="img" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeGray size">预约抢购优惠200元</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
		</div>
	</div>
	<!--猜你喜欢-->
	<div class="ming">
		<div class="ming-top">
			<span class="title">猜你喜欢</span>
			<div class="shuax">
				<span class="sxTu"></span>
				<span class="sx">换一批</span>
			</div>
		</div>
		<div class="ming-bottom">
			<ul>
				<li class="boderLeft">
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="padding" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="padding" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="padding" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="padding" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="padding" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
			<ul>
				<li>
					<a href=""><img src="././Public/Home/images/m.jpg" alt="" class="padding" /></a>
					<a href="" class="sizeBlack size">YOGA 4S(YOGA 900S)-</a>
					<a href="" class="sizeRed size">7,999元</a>
				</li>
			</ul>
		</div>
	</div>
	<!--楼层-->
	<div class="floor">
		<!--1F-->
		<div class="boxF">
			<div class="boxF-top">
				<div class="topLeft">
					<span>1F Lenovo 电脑</span>
				</div>
				<div class="topRight">
					<ul>
						<li><a href="">YOGA4 Pro系列</a></li>
						<li><a href="">YOGA4 Pro系列</a></li>
						<li><a href="">YOGA4 Pro系列</a></li>
						<li><a href="">YOGA4 Pro系列</a></li>
						<li><a href="">YOGA4 Pro系列</a></li>
						<li class="gengduo"><a href="">更多</a><span></span></li>
					</ul>
				</div>
			</div>
			<div class="boxF-bottom">
				<div class="bottomLeft">
					<img src="././Public/Home/images/F.jpg" alt="" />
				</div>
				<div class="bottomRight">
					<ul>
						<li class="borderTop">
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
						<li class="borderTop">
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
						<li class="borderTop">
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
						<li class="borderTop">
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
						<li>
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
						<li>
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
						<li>
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
						<li>
							<a href="" class="img"><img src="./Public/Home/images/F1.jpg" alt="" /></a>
							<a href="" class="sizeBlack">Y700 I7-6700HQ（旗舰版）</a>
							<a href="" class="sizeGray">彪悍小Y 从芯进化</a>
							<a href="" class="sizeRed">8,799元</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!--7F-->
		<div class="box-f">
			<div class="fTop">
				<span>7F 社交平台</span>
			</div>
			<div class="fBottom">
				<ul>
					<li>
						<a href=""><img src="./Public/Home/images/7F.jpg" alt="" /></a>
					</li>
					<li>
						<a href=""><img src="./Public/Home/images/7F.jpg" alt="" /></a>
					</li>
					<li>
						<a href=""><img src="./Public/Home/images/7F.jpg" alt="" /></a>
					</li>
					<li>
						<a href=""><img src="./Public/Home/images/7F.jpg" alt="" /></a>
					</li>
					<li>
						<a href=""><img src="./Public/Home/images/7F.jpg" alt="" /></a>
					</li>
					<li>
						<a href=""><img src="./Public/Home/images/7F.jpg" alt="" /></a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<!--尾部-->
<div class="wb">
	<div>
		<img src="./Public/Home/images/wb.jpg" alt="" />
	</div>
</div>
<!--尾部-->
<div class="weibu">
	<div>
		<ul>
			<li class="no-a">购物指南</li>
			<li><a href="">服务商信息</a></li>
			<li><a href="">购买流程</a></li>
			<li><a href="">注册登录</a></li>
		</ul>
		<ul class="p-left">
			<li class="no-a">购物指南</li>
			<li><a href="">服务商信息</a></li>
			<li><a href="">购买流程</a></li>
			<li><a href="">注册登录</a></li>
		</ul>
		<ul class="p-left">
			<li class="no-a">购物指南</li>
			<li><a href="">服务商信息</a></li>
			<li><a href="">购买流程</a></li>
			<li><a href="">注册登录</a></li>
		</ul>
		<ul class="p-left">
			<li class="no-a">购物指南</li>
			<li><a href="">服务商信息</a></li>
			<li><a href="">购买流程</a></li>
			<li><a href="">注册登录</a></li>
		</ul>
		<ul class="p-left">
			<li class="no-a">购物指南</li>
			<li><a href="">服务商信息</a></li>
			<li><a href="">购买流程</a></li>
			<li><a href="">注册登录</a></li>
		</ul>
		<ul class="p-left">
			<li class="no-a">购物指南</li>
			<li><a href="">服务商信息</a></li>
			<li><a href="">购买流程</a></li>
			<li><a href="">注册登录</a></li>
		</ul>
	</div>	
</div>
<div class="dibu">
	<div>
		<a href="">关于联想</a>
		<span> | </span>
		<a href="">联系我们</a>
		<span> | </span>
		<a href="">工作机会</a>
		<span> | </span>
		<a href="">新闻中心</a>
		<span> | </span>
		<a href="">聚享汇会员专享</a>
		<span> | </span>
		<a href="">ZUK官网</a>
		<span> | </span>
		<a href="">联想社区</a>
		<span> | </span>
		<a href="">NBD</a>
		<span> | </span>
		<a href="">懂的通信</a>
		<span> | </span>
		<a href="">联想超融合</a>
		<span> | </span>
		<a href="">销售网点</a>
		<span> | </span>
		<a href="">服务网点</a>
		<p></p>
		<a href="">版权所有：1998-2016 联想集团</a>
		<span> | </span>
		<a href="">法律公告</a>
		<span> | </span>
		<a href="">隐私保护</a>
		<span> | </span>
		<a href="">京ICP备11035381</a>
		<span> | </span>
		<a href="">京公网安备110108007970号</a>
		<span> | </span>
		<a href="">营业执照：110000410127232</a>
	</div>
</div>
</body>
</html>































































